import request from '@/utils/request'
import {HOST} from '@/constants'
import qs from 'qs'

export function studentLogin(data) {
  return request({
    url: `${HOST}/login/student`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function teacherLogin(data) {
  return request({
    url: `${HOST}/login/teacher`,
    method: 'post',
    data: qs.stringify(data)
  })
}

export function getFileOssConfig(data) {
  return request({
    url: `${HOST}/file/oss/config`,
    method: 'get',
    params: data
  })
}

export function getDownloadUrl(data) {
  return request({
    url: `${HOST}/file/download/url`,
    method: 'get',
    params: data
  })
}

export function getFileListByPage(data) {
  return request({
    url: `${HOST}/file/list/get`,
    method: 'get',
    params: data
  })
}

